package com.action.workcall;

import com.db.workcall.*;

public class InsertAction {
	private int get;	//받는사람
	private String subject;
	private String content;
	private int sabun;
	private WorkCallDAO callDAO;
	
	public void setCallDAO(WorkCallDAO callDAO) {
		this.callDAO = callDAO;
	}
	public void setSabun(int sabun) {
		this.sabun = sabun;
	}
	public void setGet(int get) {
		this.get = get;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public String execute() throws Exception{
		WorkCallVO vo=new WorkCallVO();
		
		System.out.println("제목:"+subject);
		System.out.println("내용:"+content);
		System.out.println("받는사람:"+get);
		System.out.println("사번:"+sabun);

		vo.setSubject(subject);
		vo.setContent(content);
		vo.setGet(get);
		vo.setSend(sabun);
	
		callDAO.callInsert(vo);
		return "success";
	}
}
